﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics;
using System.Linq;
using System.Text;

namespace ElingAppSystemCtrls
{
    /// <summary>
    /// 定义表格数字控件
    /// </summary>
    public partial class EASNumberRepositoryItemTextEdit : DevExpress.XtraEditors.Repository.RepositoryItemTextEdit
    {
        public EASNumberRepositoryItemTextEdit()
        {
            InitializeComponent();
            //this.ImeMode = ImeMode.Disable;
            this.AllowNullInput = DevExpress.Utils.DefaultBoolean.True;
            this.Appearance.Options.UseTextOptions = true;
            this.Appearance.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Far;
            this.Mask.EditMask = "n2";
            this.Mask.MaskType = DevExpress.XtraEditors.Mask.MaskType.Numeric;
            this.Mask.ShowPlaceHolders = false;
            this.Mask.UseMaskAsDisplayFormat = true;
            this.NullValuePromptShowForEmptyValue = true;
            this.Spin += new DevExpress.XtraEditors.Controls.SpinEventHandler(EASNumberRepositoryItemTextEdit_Spin);
        }
        /// <summary>
        /// 防止滚轮影响
        /// <creator>wangl </creator>
        /// <date>2013-05-20</date>
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void EASNumberRepositoryItemTextEdit_Spin(object sender, DevExpress.XtraEditors.Controls.SpinEventArgs e)
        {
            e.Handled = true;
        }

        //public EASNumberRepositoryItemTextEdit(IContainer container)
        //{
        //    container.Add(this);

        //    InitializeComponent();
        //}
    }
}
